Crate coverage_helper
source ·Expand description
Helper for https://github.com/taiki-e/cargo-llvm-cov/issues/123.
Note: coverage-helper 0.1 supports #[no_coverage]
.
See coverage-helper 0.2 or later for versions that support #[coverage(off)]
.
Usage
Add this to your Cargo.toml
:
[dev-dependencies]
coverage-helper = "0.1"
And add this to your crate root (lib.rs
or main.rs
):
#![cfg_attr(coverage_nightly, feature(no_coverage))]
Examples
use coverage_helper::test;
#[test]
fn my_test() {
// ...
}
Expanded to:
#[cfg_attr(coverage_nightly, no_coverage)]
#[::core::prelude::v1::test]
fn my_test() {
// ...
}